Software testing refers to a process in which a program is operated in a specified condition to detect program errors, to measure software quality, and to evaluate whether it satisfies design requirements. Test cases are a group of test inputs, executing conditions and expected results complied for a certain particular purpose to test a certain program path or check whether a certain particular demand is satisfied.
In the software testing field, test cases are usually used to test source code. When a developer changes the source code (for example, adds, modifies or removes line in a function, or adds or removes a function in a class), a tester often has to run all test cases to cover the changed source code. However, if the source code is not changed that much, it is unnecessary to run all the test cases. If the source code is relatively complicated and/or there is relatively a large amount of test cases, it will be time-consuming and have a low efficiency due to necessity of running all test cases.